package com.jpx.jxcbiz.mapper;


import com.jpx.common.vo.CarListDto;
import com.jpx.jxcbiz.entity.TSaleList;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Mht
 * @since 2020-02-24
 */
public interface TSaleListMapper extends BaseMapper<TSaleList> {


    /**
     * 销售订单查询和列表
     * @param carListDto
     * @return
     */
    List<CarListDto> getCarList(CarListDto carListDto);


    /**
     * 根据销售订单Id查询出具体商品目录
     * @param id
     * @return
     */
    List<TSaleList> getSaleListById(@Param("id")int id);

    /**
     * 根据销售订单Id删除订单
     * @param id
     *
     */
    boolean deleteSaleListById(@Param("id") int id);

    /**
     * 根据销售订单Id删除具体商品
     * @param saleListId
     * @return
     */
    boolean deleteSaleListGoodsById(@Param("saleListId")int saleListId);

    /**
     * 添加销售表
     * @param tSaleList
     */
    void save(TSaleList tSaleList);
}
